package cn.edu.ccnu.nlp;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.Reader;
import java.util.HashMap;
import java.util.Map;

public class ReadText {
	
	public static Map getYears(String filePath){
		Reader r;
		String line;
		Map<String,Integer> years = new HashMap<String,Integer>();
		try {
			r = new FileReader(new File("./txt/years"));
			BufferedReader br = new BufferedReader(r);
			while((line = br.readLine()) != null){
				years.put(line.split(":")[0], Integer.parseInt(line.split(":")[1]));
//				System.out.println(line);
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
		return years;
	}
	
	public static void main(String[] args){
		getYears("");
	}
}
